require(["common", "jQuery", "coAjax", "href", "hash_routie"], function(jSouper, $, coAjax, href, hash_routie) {
	hash_routie.on("bus_user", function() {
		coAjax.get(appConfig.user.bus_user, function(result) {
			console.log(result.result);
			App.set("$Cache.personal.bus_user.all", result.result);
		});
	});
	App.set("$Event.personal.bus_user.未申请兑换_to_申请兑换中", function(e, vm) {
		if (!App.get("loginer.info.alipay")) {
			alert("warn", "您还未绑定支付宝账号，请到“个人信息”页进行设置，确保兑现顺利进行", 5000)
		};
		myPrompt("请输入申请提现的金额额度", (vm.get("bus.info.data_get_cash_max_each_time") || vm.get("money")).toFixed(2), function(money) {
			coAjax.put(appConfig.user.bus_user_state_未申请兑换_to_申请兑换中, {
				bus_id: vm.get("bus_id"),
				money: money
			}, function(result) {
				console.log(result.result);
				vm.set(result.result);
			});
		});
	});
	App.set("$Event.personal.bus_user.商家已经打款_to_用户确认收款", function(e, vm) {
		coAjax.put(appConfig.user.bus_user_state_商家已经打款_to_用户确认收款, {
			bus_id: vm.get("bus_id")
		}, function(result) {
			console.log(result.result);
			vm.set(result.result);
		});
	});
});